//
//  FailureLayer.h
//  firebkball
//
//  Created by ren jian on 18/5/29.
//
//

#ifndef FailureLayer_h
#define FailureLayer_h

#include "cocos2d.h"
#include "cocostudio/CocoStudio.h"
#include "ui/CocosGUI.h"
#include "UserDataManager.h"

using namespace cocostudio::timeline;

class FailureLayer : public Layer
{
private:
    int m_lastTime;
    //    size
    cocos2d::Size m_size;
    //    主节点
    cocos2d::Node *m_controller;
    // 倒计时节点
    ProgressTimer *m_fireballTimer;
    Label *m_timeLab;
public:
    virtual bool init();
    
    virtual void onEnter();
    virtual void onExit();
    
    void runProgAction();
    
    CREATE_FUNC(FailureLayer);
    
    // 投币
    void addCoin(int _number);
    // 改变币数视图
    void changeCoin();
    // 超时
    void onGameEnd();
};

#endif /* FailureLayer_h */
